<?php
/* @var $this GroupController */

$this->pageTitle=Yii::app()->name.'-'.$group->name;
?>

<h1><?=$group->name?></h1>
<h5>小组公告</h5>
<div><?=$group->description?></div>
<?php if($joined):?>
<div><a href="<?=$this->createUrl('group/quit',array('gid'=>$group->id))?>">退出小组</a></div>
<a href="<?=$this->createUrl('topic/post',array('gid'=>$group->id))?>">发布新话题</a>
<?php else:?>
<div><a href="<?=$this->createUrl('group/join',array('gid'=>$group->id))?>">加入小组</a></div>
<?php endif;?>
<div><a href="<?=$this->createUrl('group/member',array('gid'=>$group->id))?>">成员</a></div>
<?php if(!Yii::app()->user->isGuest && $admin->id == Yii::app()->user->id):?>
<div><a href="<?=$this->createUrl('group/admin',array('gid'=>$group->id))?>">管理</a></div>
<?php endif;?>
<h5>帖子列表</h5>
<?php foreach($topicList as $item):?>
	<div><a href="<?=$this->createUrl('topic/index',array('id'=>$item->id))?>"><?=$item->title?></a></div>
<?php endforeach;?>
